package com.infinit.easyreader.adpter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * 类：com.infinit.easyreader.adpter V[1.0.0]
 * 作用：
 * Created by rzy on 2016/5/28.
 */
public class BookmarkPagerAdapter extends FragmentPagerAdapter {
    private String[] titles = new String[]{"书签", "目录"};
    private List<Fragment> fragments;

    public BookmarkPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }


    @Override
    public int getCount() {
        return 2;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }


    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}



